#include "EmotionLabel.h"
#include "define.h"

EmotionLabel::EmotionLabel(int emotionName, QWidget *parent)
	: QClickLabel(parent),m_emotionName(emotionName)
{
	setAlignment(Qt::AlignCenter);
	setObjectName("emotionLabelItem");
	setFixedSize(32, 32);

	QString emotionPath = EMO_PATH(QString::number(emotionName));
	setPixmap(QPixmap(emotionPath));

	connect(this, &QClickLabel::clicked, [this]() {
		emit emotionClicked(m_emotionName);
	});
}

EmotionLabel::~EmotionLabel()
{
}
